package leecode.test2;

import java.io.*;

public class Test {
    public static void main(String[] args) {
        String encoding = "GBK";
        System.out.println("begins");
        try {
            FileInputStream fileInputStream = new FileInputStream(new File("D:\\新建文本文档.txt"));
            InputStreamReader in = new InputStreamReader(fileInputStream, encoding);
            BufferedReader bf = new BufferedReader(in);
            String s = null;
            s = bf.readLine();
            while (s != null) {
                System.out.println(s);
                s = bf.readLine();
            }
            in.close();
        } catch (FileNotFoundException ex) {
            ex.printStackTrace();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }
}
